/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Ejercicios_salon;

import java.util.Scanner;

/**
 *
 * @author Lab
 */
public class FormulaGeneral {
    public static void main(String[] args) {
        Scanner lectura= new Scanner(System.in);
    double a,b,c,a1,b1;
        System.out.println("Dame el valor de A");
        a= lectura.nextDouble();
        System.out.println("Dame el valor de B");
        b= lectura.nextDouble();
        System.out.println("Dame el valor de C");
        c= lectura.nextDouble();
        a1= (-b +(Math.sqrt(Math.pow(b, 2)-4*a*c*a)))/2;
         b1= (-b -(Math.sqrt(Math.pow(b, 2)-4*a*c*a)))/2;
         System.out.println("El resultado es igual a:\n"+a1+"\ny\n"+b1);

    }
}
